/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.web.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;
import com.jeeplus.modules.web.entity.WxCouponType;

import com.jeeplus.core.persistence.DataEntity;
import com.jeeplus.common.utils.excel.annotation.ExcelField;

import java.util.Date;

/**
 * 设备信息Entity
 * @author rongjie
 * @version 2017-08-30
 */
public class YjEquipment extends DataEntity<YjEquipment> {

	private static final long serialVersionUID = 1L;
	private String number;		// 设备号
	private String name;		// 设备名称
	private String city;		// 设备地址
	private Integer type;		// 是否连接
	private WxAgents agents;		// 是否连接
	private String url;		// 设备推广图
	private WxCouponType couponType;		// 优惠券类型
	private String total;		// 开机次数
	private String dayTotal;		// 开机次数
 	private String duration;		// 开机时长
 	private String money;		// 开机时长
	private String sim;		// sim
	private Integer maintenance;
	private Integer nextMaintenance;

	private Integer lightStatus; //设备开关灯情况   5 开灯状态 -5 关灯状态

	private Integer deviceType;
	private String mac;
	private String majiangMac;
	private Integer bingStatus;
	private Date startTime;
	private Date endTime;
	private String orders;

	public Integer getLightStatus() {
		return lightStatus;
	}

	public void setLightStatus(Integer lightStatus) {
		this.lightStatus = lightStatus;
	}

	public YjEquipment() {
		super();
		this.setIdType(IDTYPE_AUTO);
	}

	public WxAgents getAgents() {
		return agents;
	}

	public void setAgents(WxAgents agents) {
		this.agents = agents;
	}

	public YjEquipment(String id){
		super(id);
	}

	@Length(min=1, max=30, message="设备号长度必须介于 1 和 30 之间")
	@ExcelField(title="设备号", align=2, sort=1)
	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	@Length(min=1, max=30, message="设备名称长度必须介于 1 和 30 之间")
	@ExcelField(title="设备名称", align=2, sort=2)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Length(min=1, max=30, message="设备地址长度必须介于 1 和 30 之间")
	@ExcelField(title="设备地址", align=2, sort=3)
	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	@ExcelField(title="是否连接", dictType="yes_no", align=2, sort=4)
	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	@ExcelField(title="设备推广图", align=2, sort=5)
	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	@ExcelField(title="优惠券类型", fieldType=WxCouponType.class, value="", align=2, sort=6)
	public WxCouponType getCouponType() {
		return couponType;
	}

	public void setCouponType(WxCouponType couponType) {
		this.couponType = couponType;
	}

	@ExcelField(title="开机次数", align=2, sort=7)
	public String getTotal() {
		return total;
	}

	public void setTotal(String total) {
		this.total = total;
	}

	@ExcelField(title="开机时长", align=2, sort=8)
	public String getDuration() {
		return duration;
	}

	public void setDuration(String duration) {
		this.duration = duration;
	}

	public String getDayTotal() {
		return dayTotal;
	}

	public void setDayTotal(String dayTotal) {
		this.dayTotal = dayTotal;
	}

	public String getSim() {
		return sim;
	}

	public void setSim(String sim) {
		this.sim = sim;
	}

	public String getMoney() {
		return money;
	}

	public void setMoney(String money) {
		this.money = money;
	}

	public Integer getMaintenance() {
		return maintenance;
	}

	public void setMaintenance(Integer maintenance) {
		this.maintenance = maintenance;
	}

	public Integer getNextMaintenance() {
		return nextMaintenance;
	}

	public void setNextMaintenance(Integer nextMaintenance) {
		this.nextMaintenance = nextMaintenance;
	}

	@NotNull(message="设备类型不能为空")
	public Integer getDeviceType() {
		return deviceType;
	}

	public void setDeviceType(Integer deviceType) {
		this.deviceType = deviceType;
	}

	public String getMac() {
		return mac;
	}

	public void setMac(String mac) {
		this.mac = mac;
	}

	public String getMajiangMac() {
		return majiangMac;
	}

	public void setMajiangMac(String majiangMac) {
		this.majiangMac = majiangMac;
	}

	public Integer getBingStatus() {
		return bingStatus;
	}

	public void setBingStatus(Integer bingStatus) {
		this.bingStatus = bingStatus;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public String getOrders() {
		return orders;
	}

	public void setOrders(String orders) {
		this.orders = orders;
	}
}
